package com.dream.dto.socket;

import io.swagger.annotations.ApiModelProperty;



public class SocketBean {
    /**
     * 3.app上报好友列表 4.app上报群列表
     */
    @ApiModelProperty("APP->服务器: 1.聊天发送消息  5、进行上报群成员列表 6.设置管理员黑名単角色 7.踢出群成员; 100:建立连接(即上线); \n"+
            "服务器->APP: 1.转发web消息通知app 5.通知app上报群成员列表 61.设置管理员 62:设置黑名単 7:踢出群成员 ")
    public int command;

    @ApiModelProperty("json数据体:=1时,{command:1,data:'{userName:'',sendMessageTime:187687685876,sendMessage:'',messageType:1,sendMsg:''}'} \n" +
            /*"=3时,{userName:'',friendListInfo:[{friendId:'',friendName:'',friendHeadImg:''},{}]}\n" +
            "=4时,{userName:'',groupListInfo:[{groupName:'',groupHeadImg:'',groupId:''},{}]}\n" +*/
            "=5时,{userName:'',friendListInfo:[{groupId:'',friendId:'',friendName:'',friendHeadImg:''}]}\n" +
            "=6时,{userName:'',groupId:'',friendId:'',isTouchPack:1,isManager:1,isBlackList:1,isInsideUser:1}\n"+
            "=7时,{'userName': '111111',friendId:''}\n"   )
    public String data;

    @Override
    public String toString() {
        return "SocketBean{" + "command=" + command +
                ", data='" + data + '\'' +
                '}';
    }


    public static SocketBean buildCommand(int command){
        SocketBean socketBean = new SocketBean();
        socketBean.command = command;
        return socketBean;
    }

    public static SocketBean buildData(int command,String data){
        SocketBean socketBean = new SocketBean();
        socketBean.command = command;
        socketBean.data = data;
        return socketBean;
    }
}
